const tokenKey = 'token'

const setToken = (token) => {
  sessionStorage.setItem(tokenKey, token)
}

const getToken = () => {
  return sessionStorage.getItem(tokenKey)
}

const removeToken = () => {
  sessionStorage.removeItem(tokenKey)
}

export const useToken = {
  setToken,
  getToken,
  removeToken
}
